﻿using System;
using System.Runtime.Serialization;

namespace Loong.Threading.Locks
{
    [Serializable]
    public class LockReleaseException : LoongException
    {
        public string Resource { get; }

        public LockReleaseException(string resource)
            : base($"无法释放锁定的资源{resource}")
        {
            Resource = resource;
        }

        protected LockReleaseException(SerializationInfo serializationInfo, StreamingContext streamingContext)
            : base(serializationInfo, streamingContext)
        {
        }
    }
}
